<?php


namespace app\sys\model;


use think\facade\Env;

class UserSysDep
{
    public static function getParam($api)
    {
        $config["AccessKeyId"] = Env::get("USER_SYS.USER_SYS_ACCKEYID");
        $config["Signature"] = Env::get("USER_SYS.USER_SYS_SIGN");
        if(empty($config['AccessKeyId']) || empty($config['Signature'])){
            return "用户系统配置有问题~";
        }
        $rootUrl = Env::get("USER_SYS.USER_SYS_API");
        $data = [
            'url' => $rootUrl . Env::get($api),
            'data' => [
                'AccessKeyId'   => $config['AccessKeyId'],
                'Signature'     => $config['Signature'],
            ]
        ];
        return $data;
    }
}